--[[/**
-- * 
 * 所受伤害由目标代替我承受
 * [0] n 万分比
-- *
-- */]]

---@class BuffEffect615203 : BaseBuffEffect
BuffEffect615203 = ClientFight.CreateClass("BuffEffect615203", ClientFight.BaseBuffEffect)
local t = BuffEffect615203

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    local source = buff. source;
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
            .. buff.modelId .. " 添加buff时,给buff来源：" .. source.fighterId .. " 添加buff : " .. buff.buffBean.f_BuffEffectValue[1]);
    BuffManager.addBuff(fight, buff.skill, buff.target, source, false, buff.buffBean.f_BuffEffectValue[1], 1);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

function t:remove(fight, buff, force, ...)
    local buffBean = BuffManager.getBuffBean(buff.buffBean.f_BuffEffectValue[1], buff.source);
    local buffByModel = BuffManager.getBuffByModel(buff.source, buffBean, buff.target, false);
    if (buffByModel ~= nil) then
        BuffManager.removeFighterBuff(fight, buff.source, buffByModel, true);
    end
    return  ClientFight.BaseBuffEffect.remove(self,fight, buff, force,...);
end

t.New()